package oop2.anmal;

public class Dog {
	private String name;

	public Dog(String n) {
		// name = n;
		setName(n);
	}

	public void bite(Hedgehog d) {
		System.out.println(name + "咬了" + d.getName() + ",无从下口");
	}

	public void bite(GoodKindMan d) {
		System.out.println(name + "咬了" + d.getName() + ",不识好人心");
	}

	// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	public void bite(Dog d) {
		System.out.println(name + "咬了" + d.getName() + ",一嘴毛");
	}

	public String getName() {
		return name;
	}

	public void setName(String n) {
		this.name = n;
	}
}
